//
//  ThemeTableViewCell.m
//  Store
//
//  Created by Chuz NetTech on 17/4/14.
//  Copyright © 2017年 Chuz NetTech. All rights reserved.
//

#import "ThemeTableViewCell.h"
#import "BDHomeCellMerchantsView.h"

#define kFCScreenWidth  ([UIScreen mainScreen ].bounds.size.width)
#define kFCScreenHeight ([UIScreen mainScreen ].bounds.size.height)

@interface ThemeTableViewCell ()

@property (nonatomic, strong) BDHomeCellMerchantsView *merchantsView;
@property (nonatomic, strong) BDHomeModel *homeModel;
@end

@implementation ThemeTableViewCell

- (void)configeWithModel:(BDHomeModel *)model touchBlock:(void(^)())touchBlock{
    self.homeModel = model;
    self.merchantsView.merchantsBlock = touchBlock;
    [self.merchantsView configeWithModel:model];
}

- (void)layoutSubviews{
    self.merchantsView.size = CGSizeMake(self.width, self.homeModel.merachantHeight);
    self.merchantsView.center = CGPointMake(self.width / 2.0, self.height / 2.0);
}

- (BDHomeCellMerchantsView *)merchantsView{
    if (!_merchantsView) {
        self.merchantsView = [[BDHomeCellMerchantsView alloc] init];
//        _merchantsView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_merchantsView];
    }
    return _merchantsView;
}

@end
